//
//  HWBookReaderModel.m
//  嗨文
//
//  Created by 响当当 on 5/16/19.
//  Copyright © 2019 dongzheng. All rights reserved.
//

#import "HWBookReaderModel.h"

@implementation HWBookReaderModel
- (id)initWithDic:(NSDictionary *)dic
{
    if (self = [super init])
    {
        self.chaperId = IFNULL(dic[@"chaperId"], [NSNumber new]);
        self.autoCutPay = IFNULL(dic[@"autoCutPay"], [NSNumber new]);
        self.bookCoin = IFNULL(dic[@"bookCoin"], [NSNumber new]);
        self.bookId = IFNULL(dic[@"bookId"], [NSNumber new]);
        self.chapterOrder = IFNULL(dic[@"chapterOrder"], [NSNumber new]);
        self.chapterCoin = IFNULL(dic[@"chapterCoin"], [NSNumber new]);
        self.chapterContent = IFNULL(dic[@"chapterContent"], [NSString string]);
        self.preChapterCoin = IFNULL(dic[@"preChapterCoin"], [NSNumber new]);
        self.giftCoin = IFNULL(dic[@"giftCoin"], [NSNumber new]);
        self.likeStatus = IFNULL(dic[@"likeStatus"], [NSNumber new]);
        self.chapterTitle = IFNULL(dic[@"chapterTitle"], [NSString string]);
        self.authorNote = IFNULL(dic[@"authorNote"], [NSString string]);
        self.preChapterId = IFNULL(dic[@"preChapterId"], [NSNumber numberWithInteger:-1]);
        self.nextChapterId = IFNULL(dic[@"nextChapterId"], [NSNumber numberWithInteger:-1]);
        self.nextChapterCoin = IFNULL(dic[@"nextChapterCoin"], [NSNumber new]);

    }
    return self;
}
@end
